package cn.techwis.aop;

import lombok.extern.slf4j.Slf4j;
import org.aspectj.lang.ProceedingJoinPoint;
import org.aspectj.lang.annotation.Around;
import org.aspectj.lang.annotation.Aspect;
import org.springframework.stereotype.Component;

@Component
@Aspect
public class ServiceExcepHandler {
 
//    @Around("@annotation(cn.techwis.service.*)")
//    public ReturnMsg serviceExcepHandler(ProceedingJoinPoint proceedingJoinPoint) {
//        ReturnMsg returnMsg = new ReturnMsg();
//        try {
//            returnMsg = (ReturnMsg) proceedingJoinPoint.proceed();
//        } catch (MethodArgumentNotValidException me) {
//            log.error("ServiceExcepHandler serviceExcepHandler failed", throwable);
//            returnMsg.setError(BaseErrorEnum.SYS_ERROR_UNKNOW);
//        }
//        return returnMsg;
//    }
}